Optimal. Leaf size=19 \[ -2 \tanh ^{-1}\left (\frac {x+1}{\sqrt {x^2+3 x+1}}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.01, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {838, 206} \begin {gather*} -2 \tanh ^{-1}\left (\frac {x+1}{\sqrt {x^2+3 x+1}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 838
Rubi steps
\begin {align*} \int \frac {1-x}{x \sqrt {1+3 x+x^2}} \, dx &=-\left (4 \operatorname {Subst}\left (\int \frac {1}{4-x^2} \, dx,x,\frac {2+2 x}{\sqrt {1+3 x+x^2}}\right )\right )\\ &=-2 \tanh ^{-1}\left (\frac {1+x}{\sqrt {1+3 x+x^2}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.01, size = 49, normalized size = 2.58 \begin {gather*} -\tanh ^{-1}\left (\frac {2 x+3}{2 \sqrt {x^2+3 x+1}}\right )-\tanh ^{-1}\left (\frac {3 x+2}{2 \sqrt {x^2+3 x+1}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [B] time = 0.16, size = 40, normalized size = 2.11 \begin {gather*} \log \left (2 \sqrt {x^2+3 x+1}-2 x-3\right )+2 \tanh ^{-1}\left (x-\sqrt {x^2+3 x+1}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.42, size = 47, normalized size = 2.47 \begin {gather*} \log \left (4 \, x^{2} - \sqrt {x^{2} + 3 \, x + 1} {\left (4 \, x + 5\right )} + 11 \, x + 5\right ) - \log \left (-x + \sqrt {x^{2} + 3 \, x + 1} + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.20, size = 56, normalized size = 2.95 \begin {gather*} -\log \left ({\left | -x + \sqrt {x^{2} + 3 \, x + 1} + 1 \right |}\right ) + \log \left ({\left | -x + \sqrt {x^{2} + 3 \, x + 1} - 1 \right |}\right ) + \log \left ({\left | -2 \, x + 2 \, \sqrt {x^{2} + 3 \, x + 1} - 3 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.06, size = 38, normalized size = 2.00 \begin {gather*} -\arctanh \left (\frac {3 x +2}{2 \sqrt {x^{2}+3 x +1}}\right )-\ln \left (x +\frac {3}{2}+\sqrt {x^{2}+3 x +1}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.71, size = 48, normalized size = 2.53 \begin {gather*} -\log \left (2 \, x + 2 \, \sqrt {x^{2} + 3 \, x + 1} + 3\right ) - \log \left (\frac {2 \, \sqrt {x^{2} + 3 \, x + 1}}{{\left | x \right |}} + \frac {2}{{\left | x \right |}} + 3\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.83, size = 41, normalized size = 2.16 \begin {gather*} -\ln \left (\frac {3\,x+2\,\sqrt {x^2+3\,x+1}+2}{x}\right )-\ln \left (x+\sqrt {x^2+3\,x+1}+\frac {3}{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \int \left (- \frac {1}{x \sqrt {x^{2} + 3 x + 1}}\right )\, dx - \int \frac {1}{\sqrt {x^{2} + 3 x + 1}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________